home *** CD-ROM | disk | FTP | other *** search
- Path: redstone.interpath.net!mercury!softbase
- From: softbase@mercury.interpath.net (Scott McMahan - Softbase Systems)
- Newsgroups: comp.lang.c
- Subject: Re: QUESTION.LINKING PROCESS METHOD. HOW IT GOES?
- Date: 29 Feb 1996 18:13:50 GMT
- Organization: Interpath -- Providing Internet access to North Carolina
- Distribution: world
- Message-ID: <4h4qcu$24v@redstone.interpath.net>
- References: <4h1d26$nk5@diable.upc.es>
- NNTP-Posting-Host: mercury.interpath.com
- X-Newsreader: TIN [version 1.2 PL2]
-
- CARLES_JORDA_NOGALES (EI39881395@xus.upc.es) wrote:
- : 3.1 If someones know about if in a link process
- : 3.2 there are some precedense or privilege of
- : 3.3 one module to the others please answer me
- : 3.4 and explain how it works.
-
- This is totally system dependant. A lot of times, there is
- a definite order in the way modules are linked. I wrote
- a program once that had a COBOL "user exit" entry point
- I stupidly called "exit", linked it in with a C library
- that called the user exit, and when it was done linking
- the C stdlib exit() was called! The stdlib exit() overrode
- my entry point.
-
- : 3.5 Other question about link process, when is
- : 3.6 made a link process results an executable
- : 3.7 program, in this executable ┐how are situated
- : 3.8 ona structured the modules?
-
- This is completely system dependant. For UNIX, I recommend the book
- Deep C Secrets. It discusses the "standard" layout of an executable
- file in UNIX. Books for this type of information exist for other
- platforms too. Things are more complex when you have static vs dynamic
- calls.
-
- : 3.9 ┐there are each one module in one whole piece
- : 3.91 and when the control have to translate to it
- : 3.92 there are JUMP instruction?
-
- This is true only of *static* calls. Dynamic calls are much more
- involved. (This is true of everything from MVS to Windows -- dynamic
- calls involve operating system overhead to look for whatever it
- is you're calling. Static calls mean the routine is "glued" into
- the executable itself and the loader fixes up where these routines
- are in memory.)
-
- Then you get into discarable/nondiscardable/reentrant/nonreentrant
- types of things which complicate what goes on.
-
- Scott
-
-
-